var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function r() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (r.prototype = e.prototype, 
    new r());
}), a = this && this.__decorate || function(t, e, o, r) {
    var n, c = arguments.length, i = c < 3 ? e : null === r ? r = Object.getOwnPropertyDescriptor(e, o) : r;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(t, e, o, r); else for (var s = t.length - 1; 0 <= s; s--) (n = t[s]) && (i = (c < 3 ? n(i) : 3 < c ? n(e, o, i) : n(e, o)) || i);
    return 3 < c && i && Object.defineProperty(e, o, i), i;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = cc._decorator, s = r.ccclass, c = r.property, l = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.block = null, t;
    }
    return i(t, e), t.prototype.start = function() {
        var o = this;
        this.block.on(cc.Node.EventType.TOUCH_MOVE, function(t) {
            var e = t.getLocation(), t = t.getPreviousLocation();
            o.node.setPosition(o.node.getPosition().add(e.sub(t)));
        }, this);
    }, a([ c(cc.Node) ], t.prototype, "block", void 0), a([ s ], t);
}(cc.Component);

n.default = l;